> nes<-read.csv("anes2008.csv")
> summary(nes$race)
                 1. White 2. Black/African-American 
                     1442                       583 
            4. Other race                      NA's 
                      262                        35 
> summary(nes$education)
                              0. No degree earned 
                                              460 
                             1. Bachelor's degree 
                                              333 
                               2. Master's degree 
                                              121 
3. PhD, LIT, SCD, DFA, DLIT, DPH, DPHIL, JSC, SJD 
                                               16 
                                       4. LLB, JD 
                                                5 
                   5. MD, DDS, DVM, MVSA, DSC, DO 
                                                8 
                                 6. JDC, STD, THD 
                                                2 
                         7. Associate degree (AA) 
                                              260 
                                             NA's 
                                             1117 
> mean(nes$education)
[1] NA
Warning message:
In mean.default(nes$education) :
  argument is not numeric or logical: returning NA
> summary(nes$midclass)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   0.00   60.00   85.00   77.07   85.00  100.00     257 
> summary(nes$richppl)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   0.00   50.00   50.00   58.28   70.00  100.00     279 
> 
> summary(nes$workclass)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   1.00   70.00   85.00   83.97  100.00  100.00     236 
> summary(nes$poorppl)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   0.00   60.00   70.00   74.55   96.25  100.00     266 
> 
> sd(nes$midclass, na.rm=TRUE)
[1] 17.61054
> sd(nes$richppl, na.rm=TRUE)
[1] 21.40141
> sd(nes$workclass, na.rm=TRUE)
[1] 16.52078
> sd(nes$poorppl, na.rm=TRUE)
[1] 19.74461
> cor(nes$midlcass, nes$richppl, use="complete.obs")
Error in cor(nes$midlcass, nes$richppl, use = "complete.obs") : 
  'x' must be numeric
> cor(nes$midclass, nes$workclass, use="complete.obs")
[1] 0.5841736
> cor(nes$richppl, nes$poorppl, use="complete.obs")
[1] 0.2809538
> cor(nes$poorppl, nes$workclass, use="complete.obs")
[1] 0.5102406
> cor(nes$richppl, nes$midclass, use="complete.obs")
[1] 0.2904286
> histo(education)
Error: could not find function "histo"
> hist(education)
Error in hist(education) : object 'education' not found
> hist(nes$education)
Error in hist.default(nes$education) : 'x' must be numeric
> hist(nes$midclass)
> install.packages("car")
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.15/car_2.0-14.tgz'
Content type 'application/x-gzip' length 1049722 bytes (1.0 Mb)
opened URL
==================================================
downloaded 1.0 Mb


The downloaded binary packages are in
	/var/folders/pg/8j9ssc2d2r549ccv5rzsx8d40000gn/T//RtmpmwViaC/downloaded_packages
> library(car)
Loading required package: MASS
Loading required package: nnet
> scatterplot(nes$midclass, nes$workclass)
> boxplot(nes$midclass)
> scatterplot(nes$poorppl, nes$richppl)
> install.packages("wvioplot")
also installing the dependency ‘Hmisc’

trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.15/Hmisc_3.9-3.tgz'
Content type 'application/x-gzip' length 1481228 bytes (1.4 Mb)
opened URL
==================================================
downloaded 1.4 Mb

trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.15/wvioplot_0.1.tgz'
Content type 'application/x-gzip' length 11982 bytes (11 Kb)
opened URL
==================================================
downloaded 11 Kb


The downloaded binary packages are in
	/var/folders/pg/8j9ssc2d2r549ccv5rzsx8d40000gn/T//RtmpmwViaC/downloaded_packages
> library(wvioplot)
Loading required package: Hmisc
Loading required package: survival
Loading required package: splines
Hmisc library by Frank E Harrell Jr

Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')
to see overall documentation.

NOTE:Hmisc no longer redefines [.factor to drop unused levels when
subsetting.  To get the old behavior of Hmisc type dropUnusedLevels().


Attaching package: ‘Hmisc’

The following object(s) are masked from ‘package:survival’:

    untangle.specials

The following object(s) are masked from ‘package:car’:

    recode

The following object(s) are masked from ‘package:base’:

    format.pval, round.POSIXt, trunc.POSIXt, units

> par(mfrow=c(1,2))
> wvioplot(nes$poorppl, col="blue", names="Poor People")
> wvioplot(nes$richppl, col="orange", names="Rich People")
> wvioplot(nes$workclass, col="red", names="Working Class")
> wvioplot(nes$richppl, col="orange", names="Rich People")
> wvioplot(nes$richppl, col="orange", names="Rich People")
> wvioplot(nes$midclass, col="green", names="Middle Class")
> pie(nes$race, main="Race", col=rainbow(length(race)),
+    labels=c("White","Black","Other","NA's"))
Error in pie(nes$race, main = "Race", col = rainbow(length(race)), labels = c("White",  : 
  'x' values must be positive.
> 